#include <stdio.h>

#include <freeRTOS/FreeRTOS.h>
#include <esp_log.h>

#include "adc.h"


int16_t heat_sensitive_AdVal, light_AdVal;
float heat_sensitive_Voltage, light_Voltage;
void app_main(void)
{
    myADC_Init();
    while (1)
    {
        myADC_GetAdAndVoltage_Value(&heat_sensitive_AdVal, &light_AdVal, &heat_sensitive_Voltage, &light_Voltage);
        ESP_LOGI("main","热敏传感器的AD值: %d\t 光敏的AD: %d \n",heat_sensitive_AdVal,light_AdVal);
        ESP_LOGI("main","热敏传感器电压值: %.2f\t 光敏电压值: %.2f ",heat_sensitive_Voltage,light_Voltage);
        vTaskDelay(pdMS_TO_TICKS(1000));
    }


}